<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/page/inc/taglib.jsp"%>
<div class="pageHeader">
	<form id="pagerForm" onsubmit="return dialogSearch(this);" action="${pageContext.request.contextPath}/shop/handover/list" method="post">
		<!-- 分页表单参数 -->
		<%@include file="/WEB-INF/page/inc/pageForm.jsp"%>
		<!-- 需要排序的字段 -->
		<input type="hidden" name="orderField" value="${requestScope.dwzPageBean.countResultMap.orderField}" />
		<!-- 正序倒序 -->
		<input type="hidden" name="orderDirection" value="${requestScope.dwzPageBean.countResultMap.orderDirection}" />
		<div class="searchBar">
			<table class="searchContent">
				<tr>
					<td>
						<td>合同单号：<input type="text" name="ctno" class="" value="${requestScope.dwzPageBean.countResultMap.cton}" placeholder="输入合同单号" />
					</td>
				</tr>
			</table>
			<div class="subBar">
				<ul>
					<li>
						<div class="buttonActive">
							<div class="buttonContent">
								<button type="submit">查询</button>
							</div>
						</div>
					</li>
				</ul>
			</div>
		</div>
	</form>
</div>
<div class="pageContent">
	<table class="table" targetType="navTab" asc="asc" desc="desc" width="100%" layoutH="138">
		<thead>
			<tr>
				<th width="22"><input type="checkbox" group="id" class="checkboxCtrl"></th>
										<th orderField="name" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'name'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>业主姓名</th>
										<th orderField="age" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'age'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>年龄</th>
										<th orderField="phone" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'phone'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>联系电话</th>
										<th orderField="qq" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'qq'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>QQ</th>
										<th orderField="sgtm" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'sgtm'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>签约时间</th>
										<th orderField="source" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'source'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>客户来源</th>
										<th orderField="state" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'state'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>移交状态</th>
										<th orderField="ctno" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'ctno'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>合同编号</th>
										<th orderField="rvid" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'rvid'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>审核人</th>
								<th width="165">操作</th>
			</tr>
		</thead>
		<tbody>
			
				<c:if test="${requestScope.dwzPageBean != null &&  requestScope.dwzPageBean.recordList != null }">
					<c:forEach var="record" items="${requestScope.dwzPageBean.recordList}" varStatus="status">
						<tr >
							<td><input name="id" value="${record.id}" type="checkbox"></td>
							<td>${record.name}</td>
							<td>${record.age}</td>
							<td>${record.phone}</td>
							<td>${record.qq}</td>
							<td><fmt:formatDate value="${record.sgtm}" pattern="yyyy-MM-dd" /></td>
							<td>${record.source}</td>
							<td>${record.state==1?'申请移交':(record.state==2?'移交通过':'移交失败')}</td>
							<td>${record.ctno}</td>
							<td>${record.rvid}</td>
							<td>
								<shiro:hasPermission name="/shop/handover/toReview">
									<a title="审核" close="handoverload" width="860" rel="review" height="760" target="dialog" href="${pageContext.request.contextPath}/shop/handover/toReview?id=${record.id}" class="editBtn" mask="true"><span>审核</span></a>
								</shiro:hasPermission>
							</td>
						</tr>
					</c:forEach>
				</c:if>
			
		</tbody>
	</table>
	<!-- 分页条 -->
	<%@include file="/WEB-INF/page/inc/dialogPageBar.jsp"%>
</div>
<script>
function handoverload() {
	navTab.reload($("#pagerForm", navTab.getCurrentPanel()).attr("action"), $("#pagerForm", navTab.getCurrentPanel()).serializeArray());
	return true;
}
</script>